<?php

require_once ('include/permiss.php');
require_once('config.php');
if (isset($_GET['action']) == 'del') {
    $product_id = $_GET['product_id'];
    $pdo = $conn->prepare('DELETE FROM datab_product WHERE product_id=?');
    $pdo->execute(array($product_id));
    $kq = 0;
    if ($pdo->rowCount()) {
        $kq = 1;
    }

    header('Location: product.php?del=status&kq=' . $kq . "&token=" . $_GET['token']);
}
?>
